package LuoGu.入门.津津的储蓄计划;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int [] m = new int[12];
        for(int i=0;i<12;i++){
            m[i] = s.nextInt();
        }
        int month = 0;
        //输出日期返回条件
        boolean flag = false;
        //所有钱(花完后)
        int all = 0;
        int all2 = 0;
        for(int i=0;i<12;i++){
            if((all+300-m[i]>0)&&(all+300-m[i])/100!=0){
                all2+=(all+300-m[i])/100*100;
                all = all+300-m[i]-(all+300-m[i])/100*100;
            }else if(all+300-m[i]>0){
                all = all+300-m[i];
            }
            else if(all+300-m[i]<0){
                month = i;
                flag = true;
                break;
            }
        }
        if(flag) System.out.print("-"+(month+1));
        else System.out.print(all+all2*1.2);
    }
}
